<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .no-active{
            font-size: 40px;
            color: blue;
        }
        .active{
            font-size: 30px;
            color: red;
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- class绑定 -->
        <div :class="className">这是第一个div</div>
        <div :class="{'active':bol,'no-active': !bol}">这是第二个div</div>
        <div :class="['no-active','active']">这是第三个div</div>

        <!-- style绑定 -->
        <div style="color:blue;font-size:30px;">这是style的div1</div>
        <div :style="{color:'blue'}">这是style的div2</div>
        <div :style="{color:styleBol ? 'yellow' : 'blue'}">这是style的div3</div>

    </div>


    <script src="js/vue.js"></script>
    <script>
        let myApp = new Vue({
            el:'#app',
            data:{
                bol:true,
                className:'active',
                styleBol:true
            }
        })
    </script>
</body>
</html>